/**
 * 
 */
package com.ez.supervise.service.impl;

import java.util.List;

import com.ez.supervise.dao.RoleDao;
import com.ez.supervise.model.sys.Role;
import com.ez.supervise.service.RoleService;

/**
 * @author searph.wang
 * @email searph.wang@gmail.com
 * @Created at 2009-7-22
 * 
 */
public class RoleServiceImpl implements RoleService {
    private RoleDao roleDao;

    // public int update(Role role) {
    // return sqlMapClientTemplate.update("sys.updateRole", role);
    // }

    public void setRoleDao(RoleDao roleDao) {
	this.roleDao = roleDao;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#delete(java.lang.Long)
     */
    public void delete(Long id) {
	roleDao.delete(id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#insert(java.lang.Object)
     */
    public void insert(Object entity) {
	roleDao.insert(entity);

    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#update(java.lang.Object)
     */
    public void update(Object entity) {
	roleDao.update(entity);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#get(java.lang.Long)
     */
    public Object get(Long id) {
	return (Role) roleDao.get(id);
    }

    public List<Role> findAllRole() {
	return roleDao.findAllRole();
    }
}
